package id.laskarmedia.opnvpn_flutter.util;

import android.net.ConnectivityManager;
import android.net.NetworkInfo;

import id.laskarmedia.opnvpn_flutter.ContextHelper;


public class CheckInternetConnection {

    public boolean netCheck() {
        ConnectivityManager cm = ContextHelper.getConnectivityManager();
        if (cm == null) {
            return false;
        }
        NetworkInfo nInfo = cm.getActiveNetworkInfo();
        return nInfo != null && nInfo.isConnectedOrConnecting();
    }
}
